/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import dao.ConnectDB;
import entities.Acc;
/**
 *
 * @author Jung Jin Hyuk
 */
public class Accounts {
    ConnectDB myConn = new ConnectDB();
    Connection conn;
    Acc a=new Acc();

    
     public void insertAccount(String account, String pass, String fullName, String birthday, String gender, String addres, String email, int phone){    
              
        try {
           
            conn = myConn.getConnect();
            PreparedStatement stm = conn.prepareStatement("INSERT INTO userName(account,pass,FullName,Birthday,Gender,addres,email,phone) VALUES('" + account +"','"  + pass+"','" + fullName +"','"+birthday+"','" +gender+"','"+addres+"','"+email+"'," + phone + ")");           
            stm.executeQuery();
            conn.close();
        }catch(Exception e){
            e.printStackTrace();
            
        }
     }
}
